<template>
  <span>共{{ total }}条记录，第{{ page }}/{{ pageTotal }}页</span>
</template>
<script>
export default {
  name: "page-header",
  props: {
    page: {
      type: Number,
      default: 0
    },
    pageSize: {
      type: Number,
      default: 0
    },
    total: {
      type: Number,
      default: 0
    }
  },
  computed: {
    pageTotal() {
      const { total, pageSize } = this;
      return Math.ceil(total / pageSize) || 1;
    }
  }
};
</script>
